Skip to content

Commit 599820e

Browse files
authored
improved display of question marked as spam by (#6572)
1 parent a00cdef commit 599820e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

kitsune/questions/jinja2/questions/question_details.html

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,15 @@ <h2 class="sumo-callout-heading summary {% if product %}no-product-heading{% end
135135

136136
{% if question.is_spam %}
137137
<p class="is-spam">
138-
{% trans marked_by=question.marked_as_spam_by, marked_time=question.marked_as_spam %}
139-
Marked as spam by {{ marked_by }} at {{ marked_time }}
140-
{% endtrans %}
138+
{% if question.marked_as_spam_by %}
139+
{% trans marked_by=question.marked_as_spam_by, marked_time=question.marked_as_spam %}
140+
Marked as spam by {{ marked_by }} at {{ marked_time }}
141+
{% endtrans %}
142+
{% else %}
143+
{% trans marked_time=question.marked_as_spam %}
144+
Marked as spam at {{ marked_time }}
145+
{% endtrans %}
146+
{% endif %}
141147
</p>
142148
{% endif %}
143149
</div>
@@ -395,14 +401,14 @@ <h3 class="sumo-card-heading">{{ _('Post a Reply') }}</h3>
395401
{% if can_tag %}
396402
{% if tag_adding_error %}
397403
<p class="tag-error-message">{{ tag_adding_error }}</p>
398-
{% endif %}
404+
{% endif %}
399405
<form id="tag-adder-form-{{ question.id }}">
400406
<div class="field">
401407
<select id="tag-select-{{ question.id }}" name="tags" multiple class="tag-select"
402408
data-add-url="{{ url('questions.add_tag_async', question.id) }}"
403409
data-remove-url="{{ url('questions.remove_tag_async', question.id) }}">
404410
{% for tag in all_tags %}
405-
<option value="{{ tag.id }}"
411+
<option value="{{ tag.id }}"
406412
data-url="{{ url('questions.list', product.slug if product else 'all')|urlparams(tagged=tag.slug) }}"
407413
{% if tag in question.tags.all() %}selected{% endif %}>
408414
{{ tag.name }}

0 commit comments

Comments
 (0)